#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main1dgs()
{
    int n;
    scanf("%d", &n);
    int i = 0, j = 0;
    for (; i < 32; i++)
    {
        if (n & 1)
            j++;
        n = n >> 1;
    }
    printf("%d", j);
	printf("");
	return 0;
}